<template>
        <FormSolutionComponent :paramsControl="paramsControl" :dialogClose="dialogClose" :isShowFormDialog="isShowFormDialog"></FormSolutionComponent>
</template>

<script>
import BaseDialogComponent from "@/components/layer/BaseDialogComponent.js";
import FormSolutionComponent from './FormSolutionComponent';
export default {
    name: "FormSolutionComponentDialog",
    mixins: [BaseDialogComponent],
    components: {
        FormSolutionComponent,
    },
    data(){
        return{

            /**
             * 用于页面定制控件渲染
             */
            paramsControl: {},
            //是否弹框打开表单
            isShowFormDialog: true,
        }
    },
    onLoad(params){
        let openFormParams = uni.getStorageSync('openFormParams')
        let obj = openFormParams.params;
        this.paramsControl = obj.paramsControl;
        this.isShowFormDialog = obj.isShowFormDialog
        if(this.paramsControl.title){
            uni.setNavigationBarTitle({
                title:this.paramsControl.title
            });
        }
    },

    methods:{
        dialogClose(){
            let self = this;
            uni.navigateBack({
                delta:1,
                success:function() {
                    uni.$emit(self.eventName,{
                        action:'ok',
                    })
                }
            })
        },
    }
}
</script>

<style scoped>

</style>
